package com.tan.utils;

import com.sun.xml.internal.ws.client.RequestContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class LogUtils {
    /**
     * @param clazz 类信息
     * @param info  提示消息
     * @return void
     */
    public static void LogInfo(Class<? extends Object> clazz, String info) {
        Log log = LogFactory.getLog(clazz);
        log.info("提示消息:" + formatDate() + info);
    }

    private static String formatDate() {
        Date date = new Date();
        DateFormat dateFormat = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss");

        return dateFormat.format(date);
    }
}